import request from '@/utils/request'

// offer发送

export function sendOffer(ids) {
  return request({
    url: '/hr/resume/sendOffer/' + ids,
    method: 'post',
  })
}


// 入职
export function doInduction(ids) {
  return request({
    url: '/hr/resume/doInduction/' + ids,
    method: 'post',
  })
}
// 取消入职
export function cancelInduction(ids) {
  return request({
    url: '/hr/resume/cancelInduction/' + ids,
    method: 'post',
  })
}


// 录用审核分配
export function doDispatch(params) {
  return request({
    url: '/hr/resume/dispatch',
    method: 'post',
    data: params
  })
}


// 审核简历或者录用审核
export function doCheck(params) {
  return request({
    url: '/hr/resume/doCheck',
    method: 'put',
    data: params
  })
}


// 加入无效库
export function addFailure(id) {
  return request({
    url: '/hr/resume/addFailure/' + id,
    method: 'put',
  })
}
// 加入黑名单
export function addBlack(id) {
  return request({
    url: '/hr/resume/addBlack/' + id,
    method: 'put',
  })
}
// 加入人才库
export function addAbility(id) {
  return request({
    url: '/hr/resume/addAbility/' + id,
    method: 'put',
  })
}



// 查询HR简历列表
export function listResume(query) {
  return request({
    url: '/hr/resume/list',
    method: 'get',
    params: query
  })
}

// 查询HR简历详细
export function getResume(id) {
  return request({
    url: '/hr/resume/' + id,
    method: 'get'
  })
}

// 新增HR简历
export function addResume(data) {
  return request({
    url: '/hr/resume',
    method: 'post',
    data: data
  })
}

// 修改HR简历
export function updateResume(data) {
  return request({
    url: '/hr/resume',
    method: 'put',
    data: data
  })
}

// 删除HR简历
export function delResume(id) {
  return request({
    url: '/hr/resume/' + id,
    method: 'delete'
  })
}
